package com.xuzhen.designPattern.observer.one;

public class Child implements Observer {
	private Subject sub;
	
	public Child(Subject sub){
		this.sub=sub;
		this.sub.registerObserver(this);
	}

	@Override
	public void dispaly() {
		cring();
	}
	
	public void cring(){
		System.out.println("小孩哭了.......");
	}

}
